﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"AutoEventWireup="true" CodeFile="AddDistrict.aspx.cs" Inherits="AddDistrict" Theme="Theme1" %>



<asp:Content ID="content1" runat="server" ContentPlaceHolderID="MainContentPlaceHolder">

    <div style="text-align: center">
      <table border="0" cellspacing="0" cellpadding="0" 
            style="background-color:#ffffff; width: 1225px;">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>
              <table cellpadding="0" cellspacing="0" 
                  
                  style="width: 1205px; vertical-align: top; background-color: #C0C0C0; height: 477px;">
                  <tr>
                      <td class="style2" style="vertical-align: top">
                          <table cellpadding="0" cellspacing="0" style="width: 188px">
                              <tr>
                                  <td>
                                      <a href= "AddDistrict.aspx"> District Details</a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a href="AddCircle.aspx"> Circle Details</a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a href= "AddPoliceStation.aspx"> PoliceStation Details</a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                               <a href="anonymous/GenerateFIR.aspx"> GenerateFIR </a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a href="WitnessDetails.aspx">Witness Details</a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a href="AddMurderDetail.aspx">Murder Record</a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a href ="FIRDetails.aspx" >FIR Records</a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a href ="AddRangeTab.aspx" >Add Range</a></td></td>
                                        </tr>
                                    </table>
                                </td>
                                <td>
                                    <table cellpadding="0" cellspacing="0" 
                                        style="width: 990px; background-color: #FFFFCC; height: 385px;">
                                        <tr>
                                            <td colspan="2">
                                                <asp:Label ID="Label1" runat="server" BackColor="#666699" ForeColor="White" 
                                                    SkinID="Label2" style="font-weight: 700; font-style: italic; font-size: large" 
                                                    Text=" District Details" Width="513px"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style3">
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td class="style3">
                                                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                                    ConnectionString="<%$ ConnectionStrings:PAS_DB %>" 
                                                    DeleteCommand="DELETE FROM [DistrictTab] WHERE [SNo] = @SNo" 
                                                    InsertCommand="INSERT INTO [DistrictTab] ([SNo], [DCode], [DName], [RCode]) VALUES (@SNo, @DCode, @DName, @RCode)" 
                                                    SelectCommand="SELECT * FROM [DistrictTab]" 
                                                    
                                                    
                                                    UpdateCommand="UPDATE [DistrictTab] SET [DCode] = @DCode, [DName] = @DName, [RCode] = @RCode WHERE [SNo] = @SNo">
                                                    <DeleteParameters>
                                                        <asp:Parameter Name="SNo" Type="Int32" />
                                                    </DeleteParameters>
                                                    <UpdateParameters>
                                                        <asp:Parameter Name="DCode" Type="Int32" />
                                                        <asp:Parameter Name="DName" Type="String" />
                                                        <asp:Parameter Name="RCode" Type="Int32" />
                                                        <asp:Parameter Name="SNo" Type="Int32" />
                                                    </UpdateParameters>
                                                    <InsertParameters>
                                                        <asp:Parameter Name="SNo" Type="Int32" />
                                                        <asp:Parameter Name="DCode" Type="Int32" />
                                                        <asp:Parameter Name="DName" Type="String" />
                                                        <asp:Parameter Name="RCode" Type="Int32" />
                                                    </InsertParameters>
                                                </asp:SqlDataSource>
                                            </td>
                                            <td>
                                                &nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td class="style3">
                                                <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" 
                                                    AutoGenerateRows="False" DataKeyNames="SNo" DataSourceID="SqlDataSource1" 
                                                    Height="50px" Width="373px" CellPadding="4" ForeColor="#333333" 
                                                    GridLines="None" style="margin-left: 298px">
                                                    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                                    <CommandRowStyle BackColor="#FFFFC0" Font-Bold="True" />
                                                    <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                                                    <FieldHeaderStyle BackColor="#FFFF99" Font-Bold="True" />
                                                    <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                                                    <Fields>
                                                        <asp:BoundField DataField="SNo" HeaderText="SNo" 
                                                            ReadOnly="True" SortExpression="SNo" />
                                                        <asp:BoundField DataField="DCode" HeaderText="District Code" SortExpression="DCode" />
                                                        <asp:BoundField DataField="DName" HeaderText="District Name" SortExpression="DName" />
                                                        <asp:BoundField DataField="RCode" HeaderText="Region Code" SortExpression="RCode" />
                                                        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                                                            ShowInsertButton="True" />
                                                    </Fields>
                                                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                                    <AlternatingRowStyle BackColor="White" />
                                                </asp:DetailsView>
                                            </td>
                                            <td>
                                                &nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td class="style3">
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td class="style3">
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
            </td>
        </tr>
        </table>
    </div>

</asp:Content>